home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGIALS
/
PTUTOR2B.LZH
/
FORWARD.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
626b
|
27 lines
(* Chapter 5 - Program 8 *)
program Forward_Reference_Example;
var Number_Of_Times : integer;
procedure Write_A_Line(var Count : integer); forward;
procedure Decrement(var Index : integer);
begin
Index := Index - 1;
if Index > 0 then
Write_A_Line(Index);
end;
procedure Write_A_Line;
begin
Writeln('The value of the count is now ',Count:4);
Decrement(Count);
end;
begin (* main program *)
Number_Of_Times := 7;
Decrement(Number_Of_Times);
Writeln;
Number_Of_Times := 7;
Write_A_Line(Number_Of_Times);
end. (* of main program *)